package com.justgame.project.service.system.query;

import java.util.List;
import java.util.ArrayList;
import java.util.Optional;
import com.github.yulichang.wrapper.MPJLambdaWrapper;
import com.justgame.project.cloud.common.query.Column;
import com.justgame.project.cloud.common.query.BaseSelectBuilder;
import com.justgame.project.cloud.common.query.AbstractQueryWrapper;
import com.justgame.project.cloud.common.query.Query;
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
import com.justgame.project.service.system.entity.SysUserOperationLog;
import com.justgame.project.service.system.wrapper.SysUserOperationLogWrapper;

public class SysUserOperationLogQuery extends AbstractQueryWrapper<SysUserOperationLog, MPJLambdaWrapper<SysUserOperationLog>, SysUserOperationLogWrapper> {

    private SysUserOperationLogQuery() {
        super(new MPJLambdaWrapper<>(SysUserOperationLog.class,"sys_user_operation_log"));
    }

    public static SysUserOperationLogQuery builder(){
        return new SysUserOperationLogQuery();
    }

    public static class Select{

        private final List<Query> queries;

        protected Select(){
            queries = new ArrayList<>();
        }

        protected Select(List<Query> queries) {
            this.queries = queries;
        }

        public Query[] getQueriesArray() {
            return queries.toArray(new Query[0]);
        }

        public static SelectBuilder builder(){
            return new SelectBuilder();
        }

        public Query[] build(){
            return queries.toArray(new Query[0]);
        }

        public static class SelectBuilder extends BaseSelectBuilder {
            public SelectBuilder SysUserOperationLog(){
                return SysUserOperationLog(Column.all());
            }

            public SelectBuilder SysUserOperationLog(Column column){
                return add(Query.builder(SysUserOperationLog.class)
                            .selectColumns(column)
                            .build());
            }

            public Select build(){
                return new Select(getQueries());
            }
        }

    }
}